SMTP Server Configuration
This document provides comprehensive SMTP server configuration and setup documentation for the bulk messaging application. It covers host configuration requirements, port selection guidelines, security protocol settings, TLS/SSL configuration options, certificate validation settings, provider-specific server settings for major email providers, firewall and network configuration requirements, connection timeout settings, retry mechanisms, and troubleshooting guides for common connection issues.
The application supports both Gmail API and SMTP server configurations, with a focus on secure email delivery through configurable transport protocols and robust error handling mechanisms.
The SMTP functionality is implemented across several key components within the Electron application architecture:
Diagram sources
Section sources
The SMTP configuration system consists of several interconnected components that work together to provide secure email delivery capabilities:
SMTP Configuration Form#
The user interface component allows users to configure SMTP server settings including host, port, username, password, and security options.
SMTP Handler#
The backend handler manages the actual SMTP connection, authentication, and email sending process using Nodemailer.
IPC Communication Layer#
The Electron IPC system facilitates secure communication between the renderer process (UI) and main process (SMTP operations).
Section sources
The SMTP configuration follows a layered architecture with clear separation of concerns:
Diagram sources
SMTP Configuration Form Component#
The SMTP form component provides a comprehensive interface for configuring email server settings:
Diagram sources
Section sources
SMTP Handler Implementation#
The SMTP handler manages the complete email sending process with robust error handling and progress tracking:
Diagram sources
Section sources
IPC Communication Layer#
The Electron IPC system provides secure communication between the renderer and main processes:
Diagram sources
Section sources
Gmail SMTP Configuration#
Gmail requires specific configuration settings for secure SMTP access:
| Setting | Value | Description |
|---|---|---|
| Host | smtp.gmail.com |
Gmail SMTP server hostname |
| Port | 587 (TLS) or 465 (SSL) |
Recommended port for Gmail |
| Security | TLS/SSL | Use TLS for port 587, SSL for port 465 |
| Authentication | App Password | Use App Password instead of regular password |
Outlook/Hotmail SMTP Configuration#
Microsoft Outlook requires specific SMTP settings:
| Setting | Value | Description |
|---|---|---|
| Host | smtp-mail.outlook.com |
Outlook SMTP server hostname |
| Port | 587 |
Standard port for Outlook SMTP |
| Security | TLS | Outlook requires TLS encryption |
| Authentication | Standard Credentials | Use username and password |
Yahoo SMTP Configuration#
Yahoo Mail requires specific SMTP configuration:
| Setting | Value | Description |
|---|---|---|
| Host | smtp.mail.yahoo.com |
Yahoo SMTP server hostname |
| Port | 587 (TLS) or 465 (SSL) |
Recommended ports |
| Security | TLS/SSL | Use appropriate security protocol |
| Authentication | Standard Credentials | Use Yahoo account credentials |
Custom SMTP Server Configuration#
For custom SMTP servers, the configuration follows standard patterns:
| Setting | Example Value | Description |
|---|---|---|
| Host | smtp.yourcompany.com |
Your SMTP server hostname |
| Port | 587 |
Common SMTP port |
| Security | TLS | Recommended for security |
| Authentication | Username/Password | Standard SMTP authentication |
Section sources
TLS/SSL Configuration Options#
The SMTP handler provides flexible security configuration options:
Diagram sources
Certificate Validation Settings#
The application provides certificate validation flexibility:
Certificate Validation: Disabled for self-signed certificates (
rejectUnauthorized: false)Custom CA Certificates: Can be configured for enterprise environments
Hostname Verification: Server name verification for secure connections
Credential Storage and Security#
The application implements secure credential storage:
Encrypted Storage: SMTP credentials are stored securely using electron-store
Selective Storage: Host, port, and user are stored; passwords are not saved
Memory Management: Credentials are loaded only when needed
Section sources
Firewall Configuration#
SMTP connections require specific firewall configurations:
Diagram sources
Network Requirements#
The application requires:
Outbound Access: TCP connections to SMTP servers on configured ports
DNS Resolution: Ability to resolve SMTP server hostnames
Time Synchronization: Accurate system time for certificate validation
Proxy Support: Optional proxy configuration for restricted networks
Rate Limiting and Throttling#
The system implements intelligent rate limiting:
Default Delay: 1000ms between email sends
Configurable Delays: Users can adjust delay intervals
Provider Limits: Respects provider-specific sending limits
Backoff Strategies: Gradual increase in delays for failed attempts
Section sources
Connection Timeouts#
The SMTP handler implements comprehensive timeout mechanisms:
Retry Strategies#
The system employs progressive retry strategies:
Immediate Retry: First failure triggers immediate retry
Exponential Backoff: Subsequent failures use increasing delays
Maximum Attempts: Configurable maximum retry attempts
Error Classification: Different handling for different error types
Progress Tracking#
Real-time progress tracking provides comprehensive feedback:
Individual Email Status: Success/failure for each recipient
Overall Progress: Percentage completion indicator
Error Details: Specific error messages for failed attempts
Timing Information: Delivery timestamps and durations
Section sources
Common SMTP Connection Issues#
Authentication Failures#
Symptoms: “Authentication failed” or “Invalid credentials”
Solutions:
Verify username/password combination
Check for App Password requirements (Gmail)
Ensure two-factor authentication settings are correct
Port Blocking Issues#
Symptoms: Connection timeouts or refused connections
Solutions:
Verify firewall allows outbound connections on configured port
Check with network administrator for blocked ports
Try alternative ports (587 vs 465)
Certificate Validation Errors#
Symptoms: “Certificate verification failed” errors
Solutions:
Check system date/time synchronization
Verify certificate chain validity
Consider enterprise certificate authority configuration
DNS Resolution Problems#
Symptoms: “Host not found” or “DNS resolution failed”
Solutions:
Verify SMTP server hostname spelling
Test DNS resolution using command line tools
Check network connectivity and DNS server configuration
Network Connectivity Failures#
Proxy Configuration Issues#
Symptoms: Connection timeouts behind corporate firewalls
Solutions:
Configure proxy settings in network preferences
Verify proxy authentication requirements
Test proxy connectivity independently
ISP Blocking Issues#
Symptoms: Consistent connection failures to specific providers
Solutions:
Contact ISP to unblock SMTP ports
Use alternative SMTP providers
Configure SMTP over different ports
Performance and Rate Limiting Issues#
Excessive Rate Limiting#
Symptoms: Slow sending speeds or frequent delays
Solutions:
Adjust delay settings in configuration
Reduce batch sizes for large mailing lists
Implement staggered sending schedules
Memory and Resource Issues#
Symptoms: Application slowdown or crashes during bulk sending
Solutions:
Monitor system resources during operation
Reduce concurrent connections
Optimize email content size
Section sources
Gmail SMTP Configuration Example#
const gmailSMTPConfig = {
host: "smtp.gmail.com",
port: 587,
secure: false, // Use TLS
user: "your-email@gmail.com",
pass: "your-app-password"
};
Outlook SMTP Configuration Example#
const outlookSMTPConfig = {
host: "smtp-mail.outlook.com",
port: 587,
secure: true, // Use SSL
user: "your-email@outlook.com",
pass: "your-password"
};
Custom SMTP Configuration Example#
const customSMTPConfig = {
host: "smtp.yourcompany.com",
port: 587,
secure: false, // Use TLS
user: "sender@yourcompany.com",
pass: "your-password"
};
Enterprise SMTP Configuration Example#
const enterpriseSMTPConfig = {
host: "smtp.internal.company.com",
port: 465,
secure: true,
user: "username@company.com",
pass: "enterprise-password",
tls: {
rejectUnauthorized: true,
ca: ["path/to/certificate.pem"]
}
};
Section sources
The SMTP server configuration system provides a comprehensive solution for secure email delivery with robust error handling, flexible security options, and extensive provider support. The implementation follows modern security practices while maintaining ease of use for end users.
Key strengths of the configuration system include:
Flexible Security Options: Support for TLS, SSL, and custom certificate validation
Provider-Specific Optimizations: Pre-configured settings for major email providers
Robust Error Handling: Comprehensive error reporting and recovery mechanisms
Performance Optimization: Intelligent rate limiting and progress tracking
Security Best Practices: Encrypted credential storage and secure communication
The system is designed to handle various deployment scenarios from individual users to enterprise environments, with clear configuration options for different network and security requirements.